<template>
  <div id="">
    <ul class="allocationList">
      <li v-for="(item,index) in bankList"
      :key="item.key"
      @click="chooseList(index)">
        <span>{{item.bankName}}</span>
        <!-- <img src="@/assets/images/true@2x.png" width="15" alt="" v-if="item.isChoose"> -->
      </li>
    </ul>
    <!-- <div class="fixedBottom">
      <button type="button" name="button" class="blockBtn" @click="chooseAllocation">确定</button>
    </div> -->
  </div>
</template>
<script>
export default {
  name: "",
  data: () => ({
    bankList:[],
  }),
  mounted() {
    //do something after mounting vue instance
    let that = this;
    network.get(configUrl.BANKLIST_URL,'',function(res){
      console.log(res);
      that.bankList = res.dataList;
    },function(err){
      console.log(err);
    });
  },
  methods: {
    chooseList(index) {
      this.$emit('chooseBank',this.bankList[index]);
    }
  }
}
</script>
<style lang="scss" scoped>
.allocationList{
  padding: 0 10px;
  font-size: 1rem;
  li{
    @include flex;
    justify-content: space-between;
    line-height: 3rem;
    border-bottom: 1px solid $borderColor;

  }
}
</style>
